import Qt 4.7
Item {
    width: 80; height: 80
    property string icon;
    property string clickedIcon;

    signal clicked
    MouseArea { id: ma; anchors.fill: parent; onClicked: parent.clicked() }

    Image {
        anchors.centerIn: parent
        source: parent.icon
        visible: !ma.pressed
    }
    Image {
        anchors.centerIn: parent
        source: parent.clickedIcon
        visible: ma.pressed
    }
}